package io.kiki.sba.registry.server.clientInterface.circuit.breaker;

import io.kiki.sba.registry.common.model.store.CircuitBreakerStatistic;
import io.kiki.sba.registry.common.model.store.Subscriber;

import java.util.Map;


public interface CircuitBreakerService {


    boolean pushCircuitBreaker(CircuitBreakerStatistic circuitBreakerStatistic, boolean hasPushed);

    /**
     * statistic when push success
     */
    boolean onPushSuccess(Map<String, Long> versions, Map<String, Integer> pushNums, Subscriber subscriber);

    /**
     * statistic when push fail
     */
    boolean onPushFail(Map<String, Long> versions, Subscriber subscriber);
}
